Skip to content

Support complete prompt templates for local text and image functions - #15

Merged
da03 merged 7 commits into
mainfrom
numbered-prompt-templates
Oct 8, 2026
Merged

da03 merged 7 commits into
mainfrom
numbered-prompt-templates

Conversation

@da03

@da03 da03 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Local image functions currently assemble fixed chat messages, preventing callers from reproducing prompts with custom roles, demonstrations and assistant prefixes. This change executes complete templates and uses shared numbered placeholders to position, repeat and reorder text or image arguments.

Local base models accept paw.function(None, interpreter=..., prompt_template=...). Image programs read the complete template from their .paw bundle. Existing compiled text templates and text calling conventions remain unchanged.

Image bundles using the previous chat_messages contract must be re-exported with a full template and the rendered_text / {INPUT_N} contract. There is no automatic conversion.

Validation: 702 offline tests passed. The updated CI selection passed 662 tests locally with real native-library imports blocked. Metal inference covered text-only inputs, reordered/repeated images, JSON-constrained output, and interleaved base/LoRA functions. Cross-platform CI and live service integration have not been run for this branch.

@da03
da03 merged commit 5a07d8b into main Oct 8, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant